package cn.wolfcode.crm.service.impl;

import cn.wolfcode.crm.domain.Loss;
import cn.wolfcode.crm.domain.LossItem;
import cn.wolfcode.crm.mapper.LossItemMapper;
import cn.wolfcode.crm.page.PageResult;
import cn.wolfcode.crm.query.LossItemQueryObject;
import cn.wolfcode.crm.query.LossQueryObject;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.service.ILossItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LossItemServiceImpl implements ILossItemService {
    @Autowired
    private LossItemMapper lossItemMapper;
    @Override
    public PageResult query(LossItemQueryObject qo) {
        Integer total=lossItemMapper.queryForCount(qo);
        List<LossItem> rows= lossItemMapper.queryForList(qo);
        return new PageResult(total,rows);
    }
}
